package no.ntnu.fp.gui.listeners;

import no.ntnu.fp.gui.events.AddMeetingEvent;
import no.ntnu.fp.services.MeetingService;

public class AddMeetingListener implements GuiListener<AddMeetingEvent> {
	private final MeetingService meetingService;
	
	public AddMeetingListener(MeetingService meetingService) {
		this.meetingService = meetingService;
	}

	@Override
	public void handleEvent(AddMeetingEvent evt) {
		meetingService.addMeeting(evt.getMeeting());
	}

	@Override
	public boolean isLongRunningListener() {
		return false;
	}
}
